package com.satis.compose.get.example.pages

import android.os.Bundle
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.lifecycle.viewmodel.compose.viewModel
import com.satis.compose.get.annotation.PageRoute
import com.satis.compose.get.annotation.Param
import com.satis.compose.get.example.viewmodel.MainViewMode
import com.satis.compose.get.widget.GetCenter

/**
 * @author sunshaobei on 2023/4/2
 */


@Composable
@PageRoute(route = "/app/passparam")
fun PassParamPage(@Param(key = "name") name:String,@Param(key = "age") age:Int,@Param(key = "sex") sex:String,@Param("test") t:T,viewMode: MainViewMode = viewModel(),bundle: Bundle) {

    GetCenter() {
        Text(text = "name:$name age:$age sex:$sex $t")
    }
}

data class T(val name:String,val age:Int)